package org.pentaho.cubic.client.dialogs;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.Widget;

public class PopupDialog extends PopupPanel implements HasText {

	private static PopupDialogUiBinder uiBinder = GWT
			.create(PopupDialogUiBinder.class);

	interface PopupDialogUiBinder extends UiBinder<Widget, PopupDialog> {
	}

	public PopupDialog() {
		setWidget(uiBinder.createAndBindUi(this));
	}

	@UiField
	HTML message;

	public PopupDialog(String txt) {
		setWidget(uiBinder.createAndBindUi(this));
		message.setText(txt);
	}

	public void setText(String text) {
		message.setText(text);
	}

	public String getText() {
		return message.getText();
	}

}
